package com.badlogic.androidgames.game;

import android.graphics.Color;

import com.badlogic.androidgames.framework.Game;
import com.badlogic.androidgames.framework.Graphics;
import com.badlogic.androidgames.framework.Screen;

public class Level02 extends Screen {

	public Wall[] walls;
	public Enemy[] enemies;
	
	public Level02(Game game) {
		super(game);
		Load();
	}
	
	public void Load()
	{
		walls = new Wall[]
		{		
			//new Wall(Assets.Wall,new Vector2(0,320 - 30),new Vector2(480,30)),			
			new Wall(Assets.WallQuadriculada,new Vector2(0,213 - 80),new Vector2(190,200)),
			new Wall(Assets.WallQuadriculada,new Vector2(480 - 190,213 - 80),new Vector2(190,200)),			
			new Wall(Assets.Wall,new Vector2(0,50),new Vector2(480,10)),		
		};		
		
		enemies = new Enemy[]
				{
					new Enemy(Assets.Snake, new Vector2(40, 110), new Vector2(26,21), new Vector2(17,14),2f, 
																					new Vector2(0,0), null),
					
					new Enemy(Assets.Snake, new Vector2(110,110), new Vector2(26,21), new Vector2(17,14),2f, 
																					new Vector2(0,0), null),
				
				};
	}

	@Override
	public void update(float deltaTime) {
		// TODO Auto-generated method stub

	}

	@Override
	public void present(float deltaTime) {
		
		Graphics g = game.getGraphics();
		
		if(walls != null)
		{
			for(int i = 0; i < walls.length; i++)
			{
				walls[i].Draw(g,Color.WHITE);
			}
		}
		if(enemies != null)
		{
			for(int i =0; i< enemies.length; i++)
			{
				enemies[i].Update(deltaTime);
				enemies[i].Draw(g);
			}
			
		}
	}

	@Override
	public void pause() {
		// TODO Auto-generated method stub

	}

	@Override
	public void resume() {
		// TODO Auto-generated method stub

	}

	@Override
	public void dispose() {
		// TODO Auto-generated method stub

	}

}
